3.281 \(\int \frac{\cos ^3(c+d x) (a B+b B \cos (c+d x))}{a+b \cos (c+d x)} \, dx\)

Optimal. Leaf size=28 \[ \frac{B \sin (c+d x)}{d}-\frac{B \sin ^3(c+d x)}{3 d} \]

[Out]

(B*Sin[c + d*x])/d - (B*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.015511, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.059, Rules used = {21, 2633} \[ \frac{B \sin (c+d x)}{d}-\frac{B \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^3*(a*B + b*B*Cos[c + d*x]))/(a + b*Cos[c + d*x]),x]

[Out]

(B*Sin[c + d*x])/d - (B*Sin[c + d*x]^3)/(3*d)

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x) (a B+b B \cos (c+d x))}{a+b \cos (c+d x)} \, dx &=B \int \cos ^3(c+d x) \, dx\\ &=-\frac{B \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac{B \sin (c+d x)}{d}-\frac{B \sin ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0076623, size = 28, normalized size = 1. \[ B \left (\frac{\sin (c+d x)}{d}-\frac{\sin ^3(c+d x)}{3 d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^3*(a*B + b*B*Cos[c + d*x]))/(a + b*Cos[c + d*x]),x]

[Out]

B*(Sin[c + d*x]/d - Sin[c + d*x]^3/(3*d))

________________________________________________________________________________________

Maple [A]  time = 0.051, size = 23, normalized size = 0.8 \begin{align*}{\frac{B \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x)

[Out]

1/3/d*B*(2+cos(d*x+c)^2)*sin(d*x+c)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.79838, size = 61, normalized size = 2.18 \begin{align*} \frac{{\left (B \cos \left (d x + c\right )^{2} + 2 \, B\right )} \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="fricas")

[Out]

1/3*(B*cos(d*x + c)^2 + 2*B)*sin(d*x + c)/d

________________________________________________________________________________________

Sympy [A]  time = 1.6412, size = 56, normalized size = 2. \begin{align*} \begin{cases} \frac{2 B \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac{B \sin{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\\frac{x \left (B a + B b \cos{\left (c \right )}\right ) \cos ^{3}{\left (c \right )}}{a + b \cos{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x)

[Out]

Piecewise((2*B*sin(c + d*x)**3/(3*d) + B*sin(c + d*x)*cos(c + d*x)**2/d, Ne(d, 0)), (x*(B*a + B*b*cos(c))*cos(
c)**3/(a + b*cos(c)), True))

________________________________________________________________________________________

Giac [A]  time = 1.47308, size = 34, normalized size = 1.21 \begin{align*} -\frac{B \sin \left (d x + c\right )^{3} - 3 \, B \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="giac")

[Out]

-1/3*(B*sin(d*x + c)^3 - 3*B*sin(d*x + c))/d